package vip.xiaonuo.biz.model.common;

import cn.hutool.core.comparator.CompareUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;

import java.io.Serializable;

/**
 *
 */
@Getter
@Setter
public class SelectResult implements Serializable, Comparable<SelectResult> {
    public SelectResult(Object id, Object name) {
        this.id = id;
        this.name = name;
    }

    @ApiModelProperty(value = "ID")
    private Object id;

    @ApiModelProperty(value = "名称")
    private Object name;

    @Override
    public int compareTo(@NotNull SelectResult that) {
        return CompareUtil.compare(String.valueOf(this.getId()), String.valueOf(that.getId()));
    }
}
